package cn.shopifymall.log4j;

import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;

/**
 * @Author 孤风雪影
 * @Email gitee.com/efairy520
 * @Date 2025/4/18 2:01
 * @Version 1.0
 */
public class Log4jQuickStart {

    private static final Logger logger = Logger.getLogger(Log4jQuickStart.class);

    public static void main(String[] args) throws InterruptedException {
        BasicConfigurator.configure();
        logger.setLevel(Level.DEBUG);
        logger.trace("跟踪信息");
        logger.debug("调试信息");
        logger.info("输出信息");
        Thread.sleep(1000);
        logger.warn("警告信息");
        logger.error("错误信息");
        logger.fatal("致命信息");
    }
}
